package com.woniu.custom.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniu.common.utils.PageParam;
import com.woniu.common.utils.ResponseData;
import com.woniu.custom.dto.CustomDto;
import com.woniu.custom.dto.CustomLevelDto;
import com.woniu.custom.pojo.ZyCustomLevel;
import com.woniu.custom.service.ZyCustomLevelService;
import com.woniu.custom.mapper.ZyCustomLevelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author xue
* @description 针对表【zy_custom_level】的数据库操作Service实现
* @createDate 2024-08-08 14:40:25
*/
@Service
public class ZyCustomLevelServiceImpl extends ServiceImpl<ZyCustomLevelMapper, ZyCustomLevel>
    implements ZyCustomLevelService{
    @Autowired
    private ZyCustomLevelMapper customLevelMapper;

    @Override
    public ResponseData<?> queryCustomLevelPage(PageParam<CustomLevelDto> pageParam) {
        PageHelper.startPage(pageParam.getPageNum(), pageParam.getPageSize());
        List<CustomLevelDto> customLevelDtos = customLevelMapper.queryCustomLevelPage(pageParam.getParam());
        PageInfo pageInfo = new PageInfo(customLevelDtos);
        return new ResponseData<>().success(pageInfo);
    }
}




